//
//  Kylin_RootVcTool.m
//  01-LotteryBaseFrame
//
//  Created by Kylin on 16/1/7.
//  Copyright © 2016年 kylin. All rights reserved.
//

#import "Kylin_RootVcTool.h"
#import "Kylin_TaBarViewController.h"
#import "Kylin_NewFeatureCollectionViewController.h"
#import "Kylin_SaveTool.h"

@implementation Kylin_RootVcTool

+ (UIViewController *)chooseWindowRootVc{
    
#define Kylin_Version @"Version"
     // 获取当前版本号
     NSString *currentVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"];
     
     // 获取当客户默认设置 用自已定义方法
     NSString *lastVersion = [Kylin_SaveTool objctForKey:Kylin_Version];
     
     // 获取上一个版本号进行对比
     UIViewController *rootView;
     if (![currentVersion isEqualToString:lastVersion]) {
     
         rootView = [[Kylin_NewFeatureCollectionViewController alloc]init];
         //保存当前版本号
         [Kylin_SaveTool setObjct:currentVersion forKey:Kylin_Version];
     
     }else{
         
     rootView = [[Kylin_TaBarViewController alloc]init];
     }
    return rootView;
}
@end
